package ru.gelin.android.bells;

import java.util.Calendar;
import java.util.Date;

import ru.gelin.android.bells.timers.Timer;

/**
 *  Static utility methods.
 */
public class Utils {
    
    /**
     *  Returns true if the specified date is tomorrow date (or after tomorrow...).
     *  @param  now     current time
     *  @param  date    time to check
     */
    public static boolean isTomorrow(Date now, Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(Timer.normalizeDate(now));
        calendar.add(Calendar.DAY_OF_MONTH, 1);
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        return !Timer.normalizeDate(date).before(calendar.getTime());
    }

}
